import request from "../../utils/reuqest";
import { getCodeData, LoginParams, LoginResponse } from '../../types/login'

//获取图形验证码
export function captcha(): Promise<getCodeData> {
  console.log('请求验证码API: /login/captcha');
  return request.get<any, getCodeData>(`/login/captcha`);
}
//登录
export function login(params: LoginParams): Promise<LoginResponse> {
  console.log('请求登录API: /login', params);
  return request.post<any, LoginResponse>(`/login`, params);
}